package com.order.web;

import java.io.IOException;
import java.util.List;

import javax.servlet.RequestDispatcher;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.order.dao.AduserQuery;
import com.order.dao.VegeEvaQuery;
import com.order.dao.bean.Aduser;
import com.order.dao.bean.VegeEvaluate;

public class AduserServlet extends HttpServlet{
	private static final long serialVersionUID = 1L;

	public void doGet(HttpServletRequest request,
                     HttpServletResponse response)
              throws ServletException,IOException
    {
    	doPost(request,response);
    }
    
    public void doPost(HttpServletRequest request,
                      HttpServletResponse response)
               throws ServletException,IOException
    {
    	
    	response.setContentType("text/html;charset=gbk");
    	request.setCharacterEncoding("gbk");
    	List<Aduser> list = AduserQuery.queryAll();

    	if(list!=null)
    	{
    		request.setAttribute("aduserList",list);	
       		RequestDispatcher rd=request.getRequestDispatcher("/aduser.jsp");
            rd.forward(request,response);
    	}	

    }
}
